import request from '@/utils/request';

export function getMenuList(params) {
  return request({
    url: '/getMenuList',
    method: 'get',
    params,
  });
}

export function getArticleList(params) {
  return request({
    url: '/article/list',
    method: 'get',
    params
  });
}

export function getArticleDetail(articleId) {
  return request({
    url: `/article/list/${articleId}`,
    method: 'get',
  });
}

export function deleteArticle(id) {
  return request({
    url: `/article/list/${id}`,
    method: 'delete',
  });
}


export function postArticle(classId=0,data) {
  return request({
    url: `/article/list/${classId}`,
    method: 'post',
    data,
  });
}

export function putArticle(data) {
  return request({
    url: `/article/list`,
    method: 'put',
    data,
  });
}
export function getClass() {
  return request({
    url: `/article/class`,
    method: 'get',
  });
}
